package Class.Homemade.damo0523.demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 姚东名
 * Date: 2024-05-23
 * Time: 15:26
 */
public class Animal {
    public String name;//姓名
    public int age;//年龄
    //成员方法 -> 构造代码块
    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }
    //成员方法 -> 普通方法
    public void eat() {
        System.out.println(this.name+"在吃饭.........");
    }
}
